<?php
/*
Uploadify
Copyright (c) 2012 Reactive Apps, Ronnie Garcia
Released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
*/

// Define a destination
$targetFolder = dirname(__FILE__).'/../../../'.$_GET['folder']; // Relative to the root
$fileName = strtotime('now').'_'.str_replace('&', '_', $_FILES['Filedata']['name']);

$targetFile = rtrim($targetFolder,'/').'/'.$fileName;
//$targetFile = rtrim($targetFolder,'/') . '/' . $tempFile[0].'_'.strtotime('now').'.'.$tempFile[1];

move_uploaded_file($_FILES['Filedata']['tmp_name'],$targetFile);
echo $fileName;